#pragma once

#include <iostream>
#include <vector>
#include <queue>
#include <mutex>
#include <memory>
#include <condition_variable>
#include <string>
#include <thread>

namespace hamster
{
    using TaskID = int;

    class Runnable
    {
        virtual ~Runnable();
        virtual void run_task(int task_id, int num_total_tasks) = 0;
    };

    class ThreadPoolBase
    {
        public:
            ThreadPoolBase(int num_threads);

            virtual ~ThreadPoolBase();

            virtual std::string name() = 0;

            virtual void run(Runnable* runnable, int num_total_tasks) = 0;

            virtual TaskID runAsyncWithDeps(Runnable* runnable, int num_total_tasks, 
                const std::vector<TaskID>& depth
            ) = 0;

            virtual void sync() = 0;
    };

    class ThreadPoolSpining : public ThreadPoolBase
    {
        private:
            int num_threads;
            std::vector<std::thread> workers;
            std::queue<std:>

        public:

    };


    class ThreadPoolSleeping : public ThreadPoolBase
    {

    };
}